package com.atguigu.gmall.item.vo;

import com.atguigu.gmall.pms.entity.CategoryEntity;
import com.atguigu.gmall.pms.entity.SkuImagesEntity;
import com.atguigu.gmall.pms.vo.ItemGroupVo;
import com.atguigu.gmall.pms.vo.SaleAttrValueVo;
import com.atguigu.gmall.sms.vo.ItemSaleVo;
import lombok.Data;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

@Data
public class ItemVo {

    // 面包屑所需字段 V
    private List<CategoryEntity> categories;
    private Long brandId;
    private String brandName;
    private Long spuId;
    private String spuName;

    // 商品详情页主体所需字段 V
    private Long skuId;
    private String title;
    private String subtitle;
    private BigDecimal price;
    private Integer weight;
    private String defaultImage;

    // 图片列表 V
    private List<SkuImagesEntity> images;

    // 促销信息 V
    private List<ItemSaleVo> sales;

    // 是否有货 V
    private Boolean store = false;

    // spu下所有sku的销售属性过滤列表： V
    // [{attrId: 3, attrName: 机身颜色, attrValue: ['暗夜黑', '白天白']},
    // {attrId: 4, attrName: 运行内存， attrValue: ['8G', '12G']},
    // {attrId: 5, attrName: 机身存储, attrValue: ['128G', '256G']}]
    private List<SaleAttrValueVo> saleAttrs;

    // 当前sku的销售属性 V
    // {3: '暗夜黑', 4: '12G', 5: '256G'}
    private Map<Long, String> saleAttr;

    // 销售属性组合和skuId的映射关系 V
    // {'白天白,8G,128G': 10, '白天白,12G,128G': 11}
    private String skuJsons;

    // 商品描述信息 V
    private List<String> spuImages;

    // 规格参数列表
    private List<ItemGroupVo> groups;
}
